<?php

namespace App\Models\Operation;

use Eloquent as Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class TemplateStyle
 * @package App\Models\Operation
 * @version June 14, 2018, 3:34 pm CST
 *
 * @property string name
 * @property integer size
 * @property string path
 */
class TemplateStyle extends Model
{
    use SoftDeletes;

    public $table = 'template_styles';

    protected $dates = ['deleted_at'];

    public $fillable = [
        'name',
        'size',
        'path',
        // 描述
        'description',
    ];

    /**
     * The attributes that should be casted to native types.
     *
     * @var array
     */
    protected $casts = [
        'name'        => 'string',
        'size'        => 'integer',
        'path'        => 'string',
        'description' => 'string',
    ];

    /**
     * Validation rules
     *
     * @var array
     */
    public static $rules = [
        'name' => 'required|max:50',
    ];

}
